﻿using SD.Infrastructure.EntityBase;
using SlamDunk.ValueObjects.Enums;
using System;

namespace SlamDunk.MES.Domain.Entities.StockContext
{
    /// <summary>
    /// 库存结转记录
    /// </summary>
    public class StockSettlement : AggregateRootEntity
    {
        #region # 构造器

        #region 00.无参构造器
        /// <summary>
        /// 无参构造器
        /// </summary>
        protected StockSettlement() { }
        #endregion

        #region 01.创建库存结转记录构造器
        /// <summary>
        /// 创建库存结转记录构造器
        /// </summary>
        /// <param name="materialId">物料定义Id</param>
        /// <param name="materialLotId">物料批次Id</param>
        /// <param name="storageLocationType">储存位置类型</param>
        /// <param name="storageLocationId">储存位置Id</param>
        /// <param name="storageLocationName">储存位置名称</param>
        /// <param name="settledDate">结转日期</param>
        /// <param name="quantity">数量</param>
        /// <param name="facilityId">工厂模型Id</param>
        /// <param name="description">描述</param>
        public StockSettlement(Guid materialId, Guid? materialLotId, StorageLocationType storageLocationType, string storageLocationId, string storageLocationName, DateTime settledDate, decimal quantity, Guid? facilityId, string description)
            : this()
        {
            this.MaterialId = materialId;
            this.MaterialLotId = materialLotId;
            this.StorageLocationType = storageLocationType;
            this.StorageLocationId = storageLocationId;
            this.StorageLocationName = storageLocationName;
            this.SettledDate = settledDate;
            this.Quantity = quantity;
            this.FacilityId = facilityId;
            this.Description = description;
        }
        #endregion

        #endregion

        #region # 属性

        #region 物料定义Id —— Guid MaterialId
        /// <summary>
        /// 物料定义Id
        /// </summary>
        public Guid MaterialId { get; private set; }
        #endregion

        #region 物料批次Id —— Guid? MaterialLotId
        /// <summary>
        /// 物料批次Id
        /// </summary>
        public Guid? MaterialLotId { get; private set; }
        #endregion

        #region 储存位置类型 —— StorageLocationType StorageLocationType
        /// <summary>
        /// 储存位置类型
        /// </summary>
        public StorageLocationType StorageLocationType { get; private set; }
        #endregion

        #region 储存位置Id —— string StorageLocationId
        /// <summary>
        /// 储存位置Id
        /// </summary>
        public string StorageLocationId { get; private set; }
        #endregion

        #region 储存位置名称 —— string StorageLocationName
        /// <summary>
        /// 储存位置名称
        /// </summary>
        public string StorageLocationName { get; private set; }
        #endregion

        #region 结转日期 —— DateTime SettledDate
        /// <summary>
        /// 结转日期
        /// </summary>
        public DateTime SettledDate { get; private set; }
        #endregion

        #region 数量 —— decimal Quantity
        /// <summary>
        /// 数量
        /// </summary>
        public decimal Quantity { get; private set; }
        #endregion

        #region 工厂模型Id —— Guid? FacilityId
        /// <summary>
        /// 工厂模型Id
        /// </summary>
        public Guid? FacilityId { get; private set; }
        #endregion

        #region 描述 —— string Description
        /// <summary>
        /// 描述
        /// </summary>
        public string Description { get; private set; }
        #endregion

        #endregion
    }
}
